﻿using PBO.Network.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PBO.Network
{
    public interface IBattleClientService
    {
        event Action<PlayerMove> OnSetMove;
        event Action<byte, string, List<byte>> OnSetTeam;
        event Action<string> OnPlayerExit;
        event Action<string, TieMessage> OnTie;
        event Action<int> OnSetSeed;
        event Action<List<BattleRule>> OnSetRules;

        event Action<BattleInfo> OnSetBattleInfo;
        event Action<BattleSnapshot> OnSetSnapshot;
        event Action OnRegistObserver;

        event Action OnLogoned;
        event Action<string> OnLogonFailed;
        event Action<string> OnPlayerTimeUp;

        void SendMove(PlayerMove move);
        void SendTeam(byte position, string identity, List<byte> team);
        void Exit(string identity);
        void Tie(string identity, TieMessage message);
        void Logon(string identity, BattleMode mode, string versionInfo);
        void RegistObserver(int identity);
        void SendBattleInfo(BattleInfo info);
        void SendBattleSnapshot(BattleSnapshot snapshot);
        void TimeUp(string identity);
    }
}
